home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group01a.txt / 000048_icon-group-sender _Thu Jun 1 13:46:33 2000.msg < prev    next >
Internet Message Format  |  2002-01-03  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id NAA08842
  4.     for icon-group-addresses; Thu, 1 Jun 2000 13:46:26 -0700 (MST)
  5. Message-Id: <200006012046.NAA08842@baskerville.CS.Arizona.EDU>
  6. From: "F.G. van DORP" <F.G.van.Dorp@digimedia.nl>
  7. X-Newsgroups: comp.lang.icon
  8. Subject: Re: CODE() and  @/2
  9. X-Newsreader: Forte Agent 1.7/32.534
  10. Date: Thu, 01 Jun 2000 18:56:01 GMT
  11. X-Complaints-To: abuse@chello.nl
  12. X-Trace: flipper 959885761 212.187.67.243 (Thu, 01 Jun 2000 20:56:01 MET DST)
  13. To: icon-group@optima.CS.Arizona.EDU
  14. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  15. Status: RO
  16. Content-Length: 1324
  17.  
  18. On 30 May 2000 20:09:35 -0400, Steve Wampler <swampler@noao.edu> wrote:
  19.  
  20. >"F.G. van DORP" wrote:
  21. >
  22. >> I tried
  23. >> 
  24. >>        nextLabel := create "L" || (1 to 10) || ("foo" @ &source)
  25. >
  26. >What did you intend the above to do? 
  27. ....to find out if binary @ behaves like a regular RETURN
  28.  
  29. >
  30. >        nextLabel := create "L" || (1 to 10) || "foo"
  31. >
  32. >>        write(@nextlabel)
  33. >
  34. >This must have been write(@nextLabel), right?
  35. Yes. I can't copy&paste because ICON is on another machine, which
  36. in fact is entirely "dedicated" to ICON because of all those illegal
  37. co-ex operations   ...just kidding.
  38.  
  39. Under my ICON (Windows Icon  v.9.3.1, Wi  v.1.01)  above example
  40. prints "L1foo" immediately followed by an illegal op. error.
  41. I f  you change it to, let's say
  42.              procedure main
  43.              nextLabel := create (("L" || (1 to 10) || "foo") @ &source)
  44.              write("1 ",@nextLabel)
  45.              write("2 ",@nextLabel)
  46.              write("3 ",@nextLabel)
  47.              write("4 ",@nextLabel)
  48.              write("5 ",@nextLabel)
  49.              end
  50. it prints
  51.  
  52.              "1 L1foo"
  53.              "2"
  54.              "3 L2foo"
  55.              "4"
  56.               illegal op error
  57.  
  58. This behavior doesn't change if you replace ("L" || (1 to 10) || "foo") 
  59. with any other generator, nor  &source with  &main in this particular example.
  60.  
  61.